\hypertarget{oops_8cpp}{
\subsection{Examples/04HeatDiffusion/oops.cpp File Reference}
\label{oops_8cpp}\index{Examples/04HeatDiffusion/oops.cpp@{Examples/04HeatDiffusion/oops.cpp}}
}


This code solves the heat diffusion equation in 2D.  




\subsubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Luis M. de la Cruz Salas \mbox{[} Mon Apr 14 09:28:22 BST 2008 \mbox{]}
\end{DoxyAuthor}
Heat diffusion equation in two dimensions: $ \frac{\partial T}{\partial t} = \nabla^2 T$. \begin{DoxyParagraph}{}
This equation is solved in a unit square interval $ x, y \in [0,1] $. The initial condition is \char`\"{}OOPS\char`\"{}(Object-\/Oriented Programming for Science) inside the square. The boundary conditions are $ T = 0 $ in all walls of the square. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{Compiling and running}
Modify the variables BASE and BLITZ in the file {\ttfamily tuna-\/cfd-\/rules.in} according to your installation and then type the next commands: \begin{DoxyVerb}
   % make
   % ./oops \end{DoxyVerb}
 The results of this example are stored in {\ttfamily DataOOPS}. Next figures show these results for the initial and an advanced time of the simulation. The graphics were plotted using OpenDX with the {\ttfamily vistempOOPS.net} script.  
\begin{DoxyImage}
\includegraphics[width=10cm]{oops1}
\caption{Initial temperature distribution}
\end{DoxyImage}
  
\begin{DoxyImage}
\includegraphics[width=10cm]{oops2}
\caption{Temperature distribution after some time steps}
\end{DoxyImage}
 
\end{DoxyParagraph}


Definition in file \hyperlink{oops_8cpp_source}{oops.cpp}.

